<!-- ----------用户编辑的页面（通过flag判定用户处于新增还是查看状态）---------- -->
<nz-modal [nzVisible]="isVisible" *ngIf="!flag" [nzWidth]="800" [nzTitle]="'问题标记'"
[nzContent]="modalContent" (nzOnOk)="handleOk($event)" (nzOnCancel)="handleCancel($event)">
  <ng-template #modalContent>
    <div class="allcontent">
      <div class="title-content">
        <div class="title-left">
          <div class="icon"></div>
          <span>问题详情</span>
        </div>
        <div class="title-right">
          <label>是否公开：</label>
          <nz-switch [(ngModel)]="ispublic"></nz-switch>
        </div>
      </div>
      <div class="problem-content msg-content">
        <div class="item">
          <label>问题名称：</label>
          <input nz-input [(ngModel)]="title" placeholder="请输入问题名称" />
        </div>
        <div class="item">
          <label>问题详情：</label>
          <textarea rows="2" nz-input [(ngModel)]="des"></textarea>
        </div>
        <div class="img-item">
          <label>相关图片：</label>
          <div class="clearfix">
            <div class=" imgContainer">
              <ng-container *ngFor="let img of fileArr;let i = index;">
                  <div class="uploadImg" (click)="handlePreview(img)">
                      <i nz-icon nzType="close-circle" nzTheme="outline"  class="close" (click)="delFile(i,fileArr)"></i>
                      <img src="{{img?.url}}" alt="" class="uploadImgs">
                  </div>
              </ng-container>
              <div class="upLoad" (click)="addCheckFile()" *ngIf="fileArr.length<9">
                <div class="icon">+</div>
                <div>上传</div>
              </div>
               <input style="display: none" name=file id='picinput' type=file  accept="image/*" capture />
            </div>
          </div>
        </div>
      </div>
      <div class="title-content">
        <div class="title-left">
          <div class="icon"></div>
          <span>解决办法</span>
        </div>
      </div>
      <div class="resolve-content msg-content">
        <div class="itemState">
          <label>解决状态：</label>
          <nz-radio-group [(ngModel)]="resolvestate">
            <label nz-radio nzValue='0'>未解决</label>
            <label nz-radio nzValue='1'>已解决</label>
          </nz-radio-group>
        </div>
        <div class="item">
          <label>解决方法：</label>
          <textarea rows="2" nz-input [(ngModel)]="resolvedes"></textarea>
        </div>
      </div>
    </div>
  </ng-template>
</nz-modal>
<nz-modal
        [nzVisible]="previewVisible"
        [nzContent]="modalContent1"
        [nzFooter]="null"
        (nzOnCancel)="previewVisible = false"
      >
        <ng-template #modalContent1>
          <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
        </ng-template>
</nz-modal>





<!-- ----------用户查看的页面---------- -->
<nz-modal [nzVisible]="isVisible" *ngIf="flag" [nzWidth]="800" [nzTitle]="'问题标记'"
[nzContent]="modalContent" [nzFooter]="null"  (nzOnCancel)="handleDesCancel($event)">
  <ng-template #modalContent>
    <div class="allcontent">
      <div class="title-content">
        <div class="title-left">
          <div class="icon"></div>
          <span>问题详情</span>
        </div>
        <a *ngIf="canEdit" (click)="update($event)">
          <i nz-icon nzType="edit" nzTheme="twotone"></i>
          <span>编辑</span>
          </a>
        <a *ngIf="!canEdit" href ="javascript:return false;" onclick="return false;" style="cursor: default;"><i nz-icon nzType="edit" nzTheme="outline"></i></a>
      </div>
      <nz-descriptions nzTitle="" nzBordered>
        <!-- <nz-descriptions-item nzTitle="编号" [nzSpan]="2">{{desData.remarkid}}</nz-descriptions-item> -->
        <nz-descriptions-item nzTitle="问题名称" [nzSpan]="2">{{desData.title}}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="是否公开">{{desData.ispublic === 1 ? '是' : '否'}}</nz-descriptions-item>
        <nz-descriptions-item [nzSpan]="3" nzTitle="问题详情">{{desData.des}}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="相关图片" [nzSpan]="3">
          <div id="image">
            <img class="relateImg" *ngFor="let item of desData.picInfo" [src]="item.picaddr"  (click)="Preview()">
          </div>
        </nz-descriptions-item>
        <nz-descriptions-item nzTitle="创建人">{{desData.creatorname}}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="创建时间">{{desData.createtime}}</nz-descriptions-item>
      </nz-descriptions>
      <div class="title-content">
        <div class="title-left">
          <div class="icon"></div>
          <span>问题处理</span>
        </div>
      </div>
      <nz-descriptions nzTitle="" nzBordered>
        <nz-descriptions-item [nzSpan]="1" nzTitle="解决状态">{{desData.resolvestate === 1? '已解决' : '未解决'}}</nz-descriptions-item>
        <nz-descriptions-item *ngIf="desData.resolvestate === 1" [nzSpan]="2" nzTitle="解决时间">{{desData.updatetime}}</nz-descriptions-item>
        <nz-descriptions-item [nzSpan]="3" nzTitle="解决方法">{{desData.resolvedes}}</nz-descriptions-item>
      </nz-descriptions>
    </div>
  </ng-template>
</nz-modal>
